********************************************************************************
********"Macroprudential Regulation, Quantitative Easing, and Bank Lending"*****
********************************************************************************

**#Bookmark (input)
use $inputdirectory/INB_preann2019m8, clear
sum e14 if e14>0, d

**#Bookmark (input)
use $inputdirectory/INB_preann2014m12, clear
sum e13 if e13>0, d

clear *
set obs 4
gen coef2019=0.074
gen exp2019=0
replace exp2019=1.25 if _n==1
replace exp2019=4.06 if _n==2
replace exp2019=9.24 if _n==3
replace exp2019=16.77 if _n==4
gen supply2019=coef2019*exp2019*6
gen coef2015=0.080
gen exp2015=0
replace exp2015=0.0003 if _n==1
replace exp2015=0.08 if _n==2
replace exp2015=0.84 if _n==3
replace exp2015=4.15 if _n==4
gen supply2015=coef2015*exp2015*6
gen x=_n

**#Bookmark (output - panel a)
twoway  (bar supply2019 x, col(gs8) barwidth(0.5)) (scatter supply2019 x, col(black) msize(big) mlabposition(1) mlabformat(%9.3fc) mlabc(black)),  xlabel(1 "25th" 2 "50th" 3 "75th" 4 "90th") ytitle("Lending growth, 6-month period") xtitle("Exposure, percentiles") legend(off) saving($outputdirectory/FIG4A, replace)

**#Bookmark (output - panel b)
twoway  (bar supply2015 x, col(gs8) barwidth(0.5)) (scatter supply2015 x, col(black) msize(big) mlabposition(1) mlabformat(%9.3fc) mlabc(black)), ylabel(0(2)8) xlabel(1 "25th" 2 "50th" 3 "75th" 4 "90th") ytitle("Lending growth, 6-month period") xtitle("Exposure, percentiles") legend(off) saving($outputdirectory/FIG4B, replace)



